using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LocationReferencingTools._Configuration._LRSNetwork
{
    /// <summary>
    /// <para>Create LRS Network From Existing Dataset</para>
    /// <para>Creates an LRS Network using an existing polyline feature class.</para>
    /// <para>使用现有折线要素类创建 LRS 网络。</para>
    /// </summary>    
    [DisplayName("Create LRS Network From Existing Dataset")]
    public class CreateLRSNetworkFromExistingDataset : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateLRSNetworkFromExistingDataset()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_feature_class">
        /// <para>LRS Network Feature Class</para>
        /// <para>The input feature class that will be registered as the LRS Network. The name of the feature class must be 26 or fewer characters. The feature class must reside in a geodatabase that contains a Pipeline Referencing LRS. The name of this feature class will be used as the name of the LRS Network.</para>
        /// <para>将注册为 LRS 网络的输入要素类。要素类的名称必须不超过 26 个字符。要素类必须位于包含管线参照 LRS 的地理数据库中。此要素类的名称将用作 LRS 网络的名称。</para>
        /// </param>
        /// <param name="_lrs_name">
        /// <para>LRS Name</para>
        /// <para>The LRS name to which the new LRS Network will be registered. The LRS must reside in the same geodatabase as the LRS Network Feature Class.</para>
        /// <para>新 LRS 网络将注册到的 LRS 名称。LRS 必须与 LRS 网络要素类位于同一地理数据库中。</para>
        /// </param>
        /// <param name="_route_id_field">
        /// <para>Route ID Field</para>
        /// <para>The field in the LRS Network Feature Class that will be mapped as the LRS Network route ID. This must be a string or GUID field type.</para>
        /// <para>LRS 网络要素类中将映射为 LRS 网络路径 ID 的字段。这必须是字符串或 GUID 字段类型。</para>
        /// </param>
        /// <param name="_from_date_field">
        /// <para>From Date Field</para>
        /// <para>A date field in the LRS Network Feature Class that will be mapped as the LRS Network from date.</para>
        /// <para>LRS 网络要素类中的日期字段，将从日期起映射为 LRS 网络。</para>
        /// </param>
        /// <param name="_to_date_field">
        /// <para>To Date Field</para>
        /// <para>A date field in the LRS Network Feature Class that will be mapped as the LRS Network to date.</para>
        /// <para>LRS 网络要素类中的日期字段，将映射为迄今为止的 LRS 网络。</para>
        /// </param>
        public CreateLRSNetworkFromExistingDataset(object _in_feature_class, object _lrs_name, object _route_id_field, object _from_date_field, object _to_date_field)
        {
            this._in_feature_class = _in_feature_class;
            this._lrs_name = _lrs_name;
            this._route_id_field = _route_id_field;
            this._from_date_field = _from_date_field;
            this._to_date_field = _to_date_field;
        }
        public override string ToolboxName => "Location Referencing Tools";

        public override string ToolName => "Create LRS Network From Existing Dataset";

        public override string CallName => "locref.CreateLRSNetworkFromExistingDataset";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_feature_class, _lrs_name, _route_id_field, _route_name_field, _from_date_field, _to_date_field, _derive_from_line_network.GetGPValue(), _line_network_name, _include_fields_to_support_lines.GetGPValue(), _line_id_field, _line_name_field, _line_order_field, _out_feature_class, _route_id_configuration.GetGPValue(), _individual_route_id_fields];

        /// <summary>
        /// <para>LRS Network Feature Class</para>
        /// <para>The input feature class that will be registered as the LRS Network. The name of the feature class must be 26 or fewer characters. The feature class must reside in a geodatabase that contains a Pipeline Referencing LRS. The name of this feature class will be used as the name of the LRS Network.</para>
        /// <para>将注册为 LRS 网络的输入要素类。要素类的名称必须不超过 26 个字符。要素类必须位于包含管线参照 LRS 的地理数据库中。此要素类的名称将用作 LRS 网络的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("LRS Network Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_feature_class { get; set; }


        /// <summary>
        /// <para>LRS Name</para>
        /// <para>The LRS name to which the new LRS Network will be registered. The LRS must reside in the same geodatabase as the LRS Network Feature Class.</para>
        /// <para>新 LRS 网络将注册到的 LRS 名称。LRS 必须与 LRS 网络要素类位于同一地理数据库中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("LRS Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _lrs_name { get; set; }


        /// <summary>
        /// <para>Route ID Field</para>
        /// <para>The field in the LRS Network Feature Class that will be mapped as the LRS Network route ID. This must be a string or GUID field type.</para>
        /// <para>LRS 网络要素类中将映射为 LRS 网络路径 ID 的字段。这必须是字符串或 GUID 字段类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _route_id_field { get; set; }


        /// <summary>
        /// <para>Route Name Field</para>
        /// <para>A string field in the LRS Network Feature Class that will be mapped as the LRS Network route name.</para>
        /// <para>LRS 网络要素类中的字符串字段，将映射为 LRS 网络路径名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _route_name_field { get; set; } = null;


        /// <summary>
        /// <para>From Date Field</para>
        /// <para>A date field in the LRS Network Feature Class that will be mapped as the LRS Network from date.</para>
        /// <para>LRS 网络要素类中的日期字段，将从日期起映射为 LRS 网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("From Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _from_date_field { get; set; }


        /// <summary>
        /// <para>To Date Field</para>
        /// <para>A date field in the LRS Network Feature Class that will be mapped as the LRS Network to date.</para>
        /// <para>LRS 网络要素类中的日期字段，将映射为迄今为止的 LRS 网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _to_date_field { get; set; }


        /// <summary>
        /// <para>Derive From Line Network</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the network will be configured as an LRS derived network.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The output of this tool will be an LRS derived network. The Line Network Name parameter must also be provided.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The output of this tool will not be an LRS derived network. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将网络配置为 LRS 派生网络。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 此工具的输出将为 LRS 派生网络。还必须提供线路网络名称参数。</bullet_item><para/>
        ///     <bullet_item>未选中 - 此工具的输出将不是 LRS 派生网络。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Derive From Line Network")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _derive_from_line_network_value _derive_from_line_network { get; set; } = _derive_from_line_network_value._false;

        public enum _derive_from_line_network_value
        {
            /// <summary>
            /// <para>DO_NOT_DERIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_DERIVE")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>DERIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DERIVE")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Line Network Name</para>
        /// <para>The name of the LRS line network to which the output LRS derived network will be registered. The input LRS line network must reside in the same geodatabase workspace as the LRS Network Feature Class. This parameter is only used if the Derive From Line Network parameter is checked.</para>
        /// <para>输出 LRS 派生网络将注册到的 LRS 线路网络的名称。输入 LRS 线网络必须与 LRS 网络要素类位于同一地理数据库工作空间中。仅当选中“从线网络派生”参数时，才使用此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Line Network Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _line_network_name { get; set; } = null;


        /// <summary>
        /// <para>Include Fields to Support Lines</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the network will be configured to support lines.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The output of this tool will be an LRS line network. The Line ID Field, Line Name Field, and Line Order Field parameters must also be provided.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The output of this tool will not be an LRS line network. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将网络配置为支持线路。</para>
        ///   <bulletList>
        ///     <bullet_item>选中—此工具的输出将为 LRS 管线网络。还必须提供行 ID 字段、行名称字段和行订单字段参数。</bullet_item><para/>
        ///     <bullet_item>未选中 - 此工具的输出将不是 LRS 管线网络。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include Fields to Support Lines")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _include_fields_to_support_lines_value _include_fields_to_support_lines { get; set; } = _include_fields_to_support_lines_value._false;

        public enum _include_fields_to_support_lines_value
        {
            /// <summary>
            /// <para>DO_NOT_INCLUDE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_INCLUDE")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>INCLUDE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INCLUDE")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Line ID Field</para>
        /// <para>The field in the LRS Network Feature Class that will be mapped as the LRS Network line ID. This parameter is only used if the Include Fields to Support Lines parameter is checked. This must be a string or GUID field type and must match the field type and length of the route ID field in the centerline sequence table. The Line ID Field parameter input must also be the same field type as the Route ID Field parameter input.</para>
        /// <para>LRS 网络要素类中将映射为 LRS 网络线 ID 的字段。仅当选中包括支持行的字段参数时，才使用此参数。这必须是字符串或 GUID 字段类型，并且必须与中心线序列表中路径 ID 字段的字段类型和长度匹配。线路 ID 字段参数输入还必须与路由 ID 字段参数输入的字段类型相同。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Line ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _line_id_field { get; set; } = null;


        /// <summary>
        /// <para>Line Name Field</para>
        /// <para>A string field in the LRS Network Feature Class that will be mapped as the LRS Network line name. This parameter is only used if the Include Fields to Support Lines parameter is checked.</para>
        /// <para>LRS 网络要素类中的字符串字段，将映射为 LRS 网络线名称。仅当选中包括支持行的字段参数时，才使用此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Line Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _line_name_field { get; set; } = null;


        /// <summary>
        /// <para>Line Order Field</para>
        /// <para>An integer field in the LRS Network Feature Class that will be mapped as the LRS Network line order. This parameter is only used if the Include Fields to Support Lines parameter is checked. This must be a long integer field type.</para>
        /// <para>LRS 网络要素类中的整数字段，将映射为 LRS 网络线顺序。仅当选中包括支持行的字段参数时，才使用此参数。这必须是长整数字段类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Line Order Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _line_order_field { get; set; } = null;


        /// <summary>
        /// <para>Output Network Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Route ID Field Configuration</para>
        /// <para><xdoc>
        ///   <para>Specifies the route ID configuration for the LRS Network.</para>
        ///   <bulletList>
        ///     <bullet_item>Autogenerated Route ID—The route ID field will be an automatically generated GUID. The route name can be configured as an LRS field. This is the default.</bullet_item><para/>
        ///     <bullet_item>Single-Field Route ID—The route ID field will be a single user-generated field. Only nonline networks are supported.</bullet_item><para/>
        ///     <bullet_item>Multi-Field Route ID—The route ID field will be a user-generated field concatenated from more than one field to form the route ID. Only nonline networks are supported.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定 LRS 网络的路由 ID 配置。</para>
        ///   <bulletList>
        ///     <bullet_item>自动生成的路由 ID - 路由 ID 字段将是自动生成的 GUID。路由名称可以配置为 LRS 字段。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>单字段路径 ID - 路径 ID 字段将是单个用户生成的字段。仅支持 nonline 网络。</bullet_item><para/>
        ///     <bullet_item>多字段路径 ID - 路径 ID 字段将是用户生成的字段，该字段由多个字段连接以形成路径 ID。仅支持 nonline 网络。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route ID Field Configuration")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _route_id_configuration_value _route_id_configuration { get; set; } = _route_id_configuration_value._AUTOGENERATED_ROUTE_ID;

        public enum _route_id_configuration_value
        {
            /// <summary>
            /// <para>Autogenerated Route ID</para>
            /// <para>Autogenerated Route ID—The route ID field will be an automatically generated GUID. The route name can be configured as an LRS field. This is the default.</para>
            /// <para>自动生成的路由 ID - 路由 ID 字段将是自动生成的 GUID。路由名称可以配置为 LRS 字段。这是默认设置。</para>
            /// </summary>
            [Description("Autogenerated Route ID")]
            [GPEnumValue("AUTOGENERATED_ROUTE_ID")]
            _AUTOGENERATED_ROUTE_ID,

            /// <summary>
            /// <para>Single-Field Route ID</para>
            /// <para>Single-Field Route ID—The route ID field will be a single user-generated field. Only nonline networks are supported.</para>
            /// <para>单字段路径 ID - 路径 ID 字段将是单个用户生成的字段。仅支持 nonline 网络。</para>
            /// </summary>
            [Description("Single-Field Route ID")]
            [GPEnumValue("SINGLE_FIELD_ROUTE_ID")]
            _SINGLE_FIELD_ROUTE_ID,

            /// <summary>
            /// <para>Multi-Field Route ID</para>
            /// <para>Multi-Field Route ID—The route ID field will be a user-generated field concatenated from more than one field to form the route ID. Only nonline networks are supported.</para>
            /// <para>多字段路径 ID - 路径 ID 字段将是用户生成的字段，该字段由多个字段连接以形成路径 ID。仅支持 nonline 网络。</para>
            /// </summary>
            [Description("Multi-Field Route ID")]
            [GPEnumValue("MULTI_FIELD_ROUTE_ID")]
            _MULTI_FIELD_ROUTE_ID,

        }

        /// <summary>
        /// <para>Field(s)</para>
        /// <para>The individual fields in the LRS Network Feature Class that will be used to form the route ID. This parameter is only used if the Route ID Field Configuration parameter is set to Multi-Field Route ID. The fields must be either string or integer field types.</para>
        /// <para>LRS 网络要素类中将用于构成路径 ID 的各个字段。仅当路由 ID 字段配置参数设置为多字段路由 ID 时，才使用此参数。字段必须是字符串或整数字段类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field(s)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _individual_route_id_fields { get; set; } = null;


        public CreateLRSNetworkFromExistingDataset SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}